<div align="center" class="information"></div>
<table class="titrepage" width="1000px">
    <tr>              
       <?php if($this->session->userdata('level')==1){?>              
        <td>
            <a class="titrea" href="<?php echo site_url('avis_admin/list_admins')?>">List admins</a>
            | <a class="titrea" href="<?php echo site_url('avis_admin/add_admin')?>">Add admin</a>
        </td>
        <?php }?>
        <td>
            <a class="titrea" href="<?php echo site_url('avis_admin/list_users')?>">List users</a>
            | <a class="titrea" href="<?php echo site_url('avis_admin/add_user')?>">Add user</a>
        </td>
    </tr>
</table>
<br/>
<table class="list"   width="100%">
    <thead>
        <tr>
            <th width="110px">Name</th>
            <th>Full name</th>
            <th width="100px">Modification</th>
            <th width="100px">Suppression</th>    
        </tr> 
        <?php foreach($query as $aRow):?>      
            <tr>
                <td><?php echo $aRow['name'];?></td>
                <td><?php echo $aRow['first_name'].' '.$aRow['last_name'];?></td> 
                <td><a href="<?php echo site_url('avis_admin/update_admin').'/'.$aRow['id'];?>">Modification</a></td> 
                <td><a href="<?php echo site_url('avis_admin/delete_admin').'/'.$aRow['id'];?>" onclick="return confirm('Are you sure you want to delete?')">Suppression</a></td> 
            </tr>
            <?php endforeach;?>
        <tr>
            <td colspan="6"><?php echo $pagination;?></td>
        </tr>
    </thead> 
    <tbody>
    </tbody>
</table>
